package service;

import entity.Books;

import java.sql.ResultSet;

public interface BooksService {
    //添加流水
    int insertBooks(Books books);
    //删除流水
    int deleteBooks(int bid);
    //修改流水
    int updateBooks(Books books);
    //查询流水列表
    ResultSet selectBooksList(int uid,String time);
    //查询单笔流水记录
    ResultSet selectBooks(int bid);
    //根据日期查询所有流水金额
    ResultSet selectAmount(int uid,int sid,String time);
    //查询本月所有流水金额
    ResultSet selectCurrentMonthAmount(int uid);
    //查询支出或收入金额
    ResultSet selectSumAmount(int uid,int sid);

    //根据aid和时间查询支出或收入金额
    ResultSet selectToday(int uid,int sid);      //今天
    ResultSet selectYesterday(int uid,int sid);      //昨天
    ResultSet selectThisWeek(int uid,int sid);      //本周
    ResultSet selectLastWeek(int uid,int sid);      //上周
    ResultSet selectNearlySevenDays(int uid,int sid);      //近7天
    ResultSet selectThisMonth(int uid,int sid);      //本月
    ResultSet selectLastMonth(int uid,int sid);      //上月
    ResultSet selectNearlyThirtyDays(int uid,int sid);      //近30天
    ResultSet selectNearlySixMonth(int uid,int sid);      //近6月
    ResultSet selectThisQuarter(int uid,int sid);      //本季度
    ResultSet selectLastQuarter(int uid,int sid);      //上季度
    ResultSet selectThisYear(int uid,int sid);      //今年
    ResultSet selectLastYear(int uid,int sid);      //去年
}
